/**
*  \file specs.c
*
*  \brief
*
*  \author Li Dajin  <Dajin.Li@Linde-China.com>
*
*
*/

/*===============================================[ private includes  ]================================================*/
#include "specs.h"
#include "../steer/steer.h"

/*===============================================[ private defines   ]================================================*/

#define SPECSEND        0x1234


/*===============================================[ private datatypes ]================================================*/

/*===============================================[ private variables ]================================================*/
/* Optimized on roller-test-bench/06.08.2014: */
#define THERMTRAC_KCPC_48V             \
{                                      \
/* F32   aHeat       ;  */    0.111f   \
/* F32   bHeat       ;  */ , 24.181f   \
/* F32   nHeat       ;  */ , 2300.0f   \
/* F32   Res         ;  */ ,  0.042f   \
/* F32   Tau         ;  */ ,  200.0f   \
}                                      \


/* Optimized on roller-test-bench/06.08.2014: */
#define THERMLIFT_KCPC_48V             \
{                                      \
/* F32   aHeat       ;  */    0.077f   \
/* F32   bHeat       ;  */ , 24.181f   \
/* F32   nHeat       ;  */ , 2750.0f   \
/* F32   Res         ;  */ ,  0.038f   \
/* F32   Tau         ;  */ ,  200.0f   \
}                                      \


#define THERMTRAC_KCPC_80V             \
{                                      \
/* F32   aHeat       ;  */    0.111f   \
/* F32   bHeat       ;  */ , 17.222f   \
/* F32   nHeat       ;  */ , 2300.0f   \
/* F32   Res         ;  */ ,  0.036f   \
/* F32   Tau         ;  */ ,  900.0f   \
}                                      \


#define THERMLIFT_KCPC_80V             \
{                                      \
/* F32   aHeat       ;  */    0.077f   \
/* F32   bHeat       ;  */ , 24.181f   \
/* F32   nHeat       ;  */ , 3000.0f   \
/* F32   Res         ;  */ ,  0.036f   \
/* F32   Tau         ;  */ ,  300.0f   \
}                                      \

                                                                                                          /*
dimensions affected by performance mode setting
                                             0:perf   ,  1:eff    ,  2:eco                                */

//KCPC_48V_3W 3Wheel
#define SPEEDMAX_PERF_KCPC_48V_3W          {   16000    ,  16000    ,  15800     }    /* max truck speed in m/h        */
#define SPEEDDEF_PERF_KCPC_48V_3W          {   16000    ,  15800    ,  15800     }    /* def truck speed in m/h        */
#define ACCEl05_PERF_KCPC_48V_3W           {    3000    ,   1000    ,    800     }    /* max accel in mm/s� at  5km/h  */
#define ACCEL15_PERF_KCPC_48V_3W           {    3000    ,    170    ,    120     }    /* max accel in mm/s� at 15km/h  */
#define IBATMAX_PERF_KCPC_48V_3W           {     600.0f ,    600.0f ,    600.0f  }    /* max battery current in A      */


//KCPC_48V_4W 4Wheel
#define SPEEDMAX_PERF_KCPC_48V_4W          {   16000    ,  16000    ,  15800     }    /* max truck speed in m/h        */
#define SPEEDDEF_PERF_KCPC_48V_4W          {   16000    ,  15800    ,  15800     }    /* def truck speed in m/h        */
#define ACCEl05_PERF_KCPC_48V_4W           {    3000    ,   1000    ,    800     }    /* max accel in mm/s� at  5km/h  */
#define ACCEL15_PERF_KCPC_48V_4W           {    3000    ,    170    ,    120     }    /* max accel in mm/s� at 15km/h  */
#define IBATMAX_PERF_KCPC_48V_4W           {     600.0f ,    600.0f ,    600.0f  }    /* max battery current in A      */

//KCPC_80V
#define SPEEDMAX_PERF_KCPC_80V             {   25000    ,  20000    ,  16000     }    /* max truck speed in m/h        */
#define SPEEDDEF_PERF_KCPC_80V             {   25000    ,  18000    ,  16000     }    /* def truck speed in m/h        */
#define ACCEl05_PERF_KCPC_80V              {    3000    ,   1200    ,    900     }    /* max accel in m/h/s at  5km/h  */
#define ACCEL15_PERF_KCPC_80V              {    3000    ,    220    ,    140     }    /* max accel in m/h/s at 15mk/h  */
#define IBATMAX_PERF_KCPC_80V              {     600.0f ,    500.0f ,    400.0f  }    /* max battery current in A      */

//INVALID
#define SPEEDMAX_PERF_INVALID              {    1000    ,   1000    ,   1000     }    /* max truck speed in m/h        */
#define SPEEDDEF_PERF_INVALID              {    1000    ,   1000    ,   1000     }    /* def truck speed in m/h        */
#define ACCEl05_PERF_INVALID               {     100    ,    100    ,    100     }    /* max accel in m/h/s at  5km/h  */
#define ACCEL15_PERF_INVALID               {     100    ,    100    ,    100     }    /* max accel in m/h/s at 15mk/h  */
#define IBATMAX_PERF_INVALID               {     100.0f ,    100.0f ,    100.0f  }    /* max battery current in A      */

/* Default Acceleration and Deceleration Values in mm/s�                                                             */
/*                                                                                                                   */
/*                                        Accel 15km/h  Accel 5km/h   Decel 5km/h   Decel 15km/h                     */

#define ACCELDECEL_DEF_KCPC_48V_3W       {     220     ,     1200    ,     2500    ,     2000    }  /* KCPC_48V 3Wheel */
#define ACCELDECEL_DEF_KCPC_48V_4W       {     220     ,     1200    ,     2500    ,     2000    }  /* KCPC_48V 4Wheel */
#define ACCELDECEL_DEF_KCPC_80V          {     450     ,     1600    ,     2500    ,     2000    }  /* BR1276            */
#define ACCELDECEL_DEF_INVALID           {     100     ,      100    ,      100    ,      100    }  /* INVALID           */


/* Default current limits (li-ion) [A]                                                         */
/*                                                                                             */
/* <1>: Minimaler Batterie-Entladestrom (2s-Prognose) bei dem das Fahrzeug gestoppt wird       */
/* <2>: Batterie-R�ckspeisestrom (2s-Prognose) ab dem die Bremskraft linear reduziert wird     */
/* <3>: Batterie-R�ckspeisestrom (2s-Prognose) bis zu dem die Bremskraft linear reduziert wird */
/* <4>: Batterie-Entladestrom (2s-Prognose) ab dem die Fahrleistung linear reduziert wird      */
/* <5>: Batterie-Entladestrom (2s-Prognose) bis zu dem die Fahrleistung linear reduziert wird  */
/* <6>: Mittlerer Durchschnittsentladestrom zur Initialisierung Restfahrzeitberechnung         */
/*                                                                                             */
/*                                     <1>   <2>   <3>   <4>   <5>   <6>                       */
/*                                     [A]   [A]   [A]   [A]   [A]   [A]                       */
#define LI_ION_KCPC_48V              { 30.0f , 440 ,  35 , 200 , 140 ,  65 }
#define LI_ION_KCPC_80V              { 30.0f , 440 ,  35 , 200 , 140 ,  65 }
#define LI_ION_INVALID               { 30.0f , 440 ,  35 , 200 , 140 ,  65 }

const MODEL_SPECS specs_INVALID =
{
/* CH    name[16]             */   "BR ???          "
/* U16   Variant              */ ,  INVALID
/* U16   TruckType            */ ,  0
/* U32   TruckID              */ ,  0

/* F32   gear                 */ ,  1.0f/40.0f
/* F32   radius               */ ,  0.291f
/* F32   weight               */ ,  4000.0f
/* F32   wheelbase            */ ,  2.000f
/* S16   SteerSen             */ ,  STEER_SEN_UNKNOWN
/* F32   compactness          */ ,  0.1f
/* F32   aSenL                */ ,  -89.0f/360.0f*ZPI
/* F32   aSenR                */ ,   89.0f/360.0f*ZPI
/* F32   gntilt               */ ,  0.477f

/* F32   BatCurrent           */ ,  600.0f
/* F32   BatCapacity          */ ,  500.0f
/* F32   BatResistIntern      */ ,  0.04F

/* F32   TqPeakGain           */ ,  75.35f * (3000.0f*3000.0f)/(48.0f*1.414f*48.0f*1.414f)     /* (NSR*NSR) / (USR*USR) */
/* F32   TqPeakSlip           */ ,  540.0f

/* F32   force0               */ ,  1.0f
/* F32   tract0               */ ,  1.0f
/* F32   tract1               */ ,  1.0f
/* F32   tract2               */ ,  1.0f
/* F32   preq                 */ ,  1.0f

/* F32   gain_ct              */ ,  1.0f
/* F32   gain_kp              */ ,  1.0f

/* F32   BDICurInit           */ ,   10.0f
/* F32   BDICurChar..         */ ,   10.0f,    10.0f
/* F32   BDICapChar..         */ ,   10.0f,    10.0f

/* THERM ThermTrac            */ ,  THERMTRAC_KCPC_48V
/* THERM ThermLift            */ ,  THERMLIFT_KCPC_48V             

/* F32   Pole_pair_num        */ ,  2.0f

/* F32   MotorTemp_Warm_Min   */ ,  150.0f         /* [�C] */
/* F32   MotorTemp_Warm_Max   */ ,  160.0f         /* [�C] */

/* S16   SpeedMin...          */ ,  1000  ,   1000 ,   1000

/* S16   SpeedMax_Perf[3]     */,  SPEEDMAX_PERF_INVALID
/* S16   SpeedDef_Perf[3]     */,  SPEEDDEF_PERF_INVALID

/* S16   Accel05_Perf[3]      */,  ACCEl05_PERF_INVALID
/* S16   Accel15_Perf[3]      */,  ACCEL15_PERF_INVALID

/* F32   iBatMax_Perf[3]      */,  IBATMAX_PERF_INVALID

/* S16   ACCELDECEL_DEF[4]    */ ,  ACCELDECEL_DEF_INVALID

/* U16   LSP_allowed          */ ,  0x0000             /* No LSP allowed */

/* F32   f32PowerMin          */ ,  0.2f               /* Min. power to climb up a 10% ramp                                      */

/* F32   f32_UCap_UpRate1     */ ,  0.06F              /*  30   [V/s] =  0.06[V] /0.002[s] */
/* F32   f32_UCap_DownRate1   */ , -0.003F             /* -5    [V/s] = -0.01[V] /0.002[s] */
/* F32   f32_UCap_UpRate2     */ ,  0.06F              /*  30   [V/s] =  0.01[V] /0.002[s] */
/* F32   f32_UCap_DownRate2   */ , -0.003F             /* -5    [V/s] = -0.006[V]/0.002[s] */
/* F32   f32_UCap_UpRate3     */ ,  0.06F              /*  30   [V/s] =  0.003[V]/0.002[s] */
/* F32   f32_UCap_DownRate3   */ , -0.003F             /* -5    [V/s] = -0.002[V]/0.002[s] */
/* F32   f32_UCap_Filt1       */ , 0.4F                /* 400[ms] */
/* F32   f32_UCap_Filt2       */ , 0.4F                /* 400[ms] */
/* F32   f32_UCap_Filt3       */ , 0.4F                /* 400[ms] */

/* U16   u16_DriveTwinPowerpart */ ,  0

/*   S16 s16_uCapLow_Min  ; S16 s16_uCapLow_Max  ; S16 s16_uCapLow_Def  ; */
       , 96                   , 96                   , 96
/*   S16 s16_uCapHigh_Min ; S16 s16_uCapHigh_Max ; S16 s16_uCapHigh_Def ; */
       , 102                  , 102                  , 102

/* S16   s16WithLithiumIon      */ ,  FALSE

///* LITHIUM_ION_SPECS LiIonSpecs */ ,  LI_ION_INVALID

/* S16   SpecsEnd             */ ,  SPECSEND
};

const MODEL_SPECS specs_KCPC_48V_3W =
{
/* CH    name[16]             */   "KCPC_48V_3W"
/* U16   Variant              */ ,  KCPC_48V_3W
/* U16   TruckType            */ ,  1265
/* U32   TruckID              */ ,  0

/* F32   gear                 */ ,  1.0f/20.45f
/* F32   radius               */ ,  /*0.231f*/ 0.2265f
/* F32   weight               */ ,  3600.0f
/* F32   wheelbase            */ ,  1.383f
/* F32   compactness          */ ,  0.333f
/* S16   SteerSen             */ ,  STEER_SEN_1L2H
/* F32   aSenL                */ , -89.0f/360.0f*ZPI
/* F32   aSenR                */ ,  89.0f/360.0f*ZPI
/* F32   gntilt               */ ,  0.477f

/* F32   BatCurrent           */ ,  600.0f         /* light ~ 700  ... heavy ~ 840 */
/* F32   BatCapacity          */ ,  550.0f
/* F32   BatResistIntern      */ ,  0.025F

/* F32   TqPeakGain           */ ,  20.0f * (3000.0f*3000.0f)/(28.0f*1.414f*28.0f*1.414f)     /* (NSR*NSR) / (USR*USR) */
/* F32   TqPeakSlip           */ ,  400.0f

/* F32   force0               */ ,  10800.0f       /* see Power.xmcd / par_mcad.m */
/* F32   tract0               */ ,  0.0456483f     /* 0.0813433,   -0.0544776,   0.323881   11485.74 */
/* F32   tract1               */ , -0.1642058f
/* F32   tract2               */ ,  0.358671f
/* F32   preq                 */ ,  11271.49f

/* F32   gain_ct              */ ,  242397.5f
/* F32   gain_kp              */ ,  0.01615727f

/* F32   BDICurInit           */ ,  50.0f
/* F32   BDICurChar..         */ ,  60.0f ,   120.0f
/* F32   BDICapChar..         */ ,  600.0f,   400.0f

/* THERM ThermTrac            */ ,  THERMTRAC_KCPC_48V
/* THERM ThermLift            */ ,  THERMLIFT_KCPC_48V

/* F32   Pole_pair_num        */ ,  2.0f

/* F32   MotorTemp_Warm_Min   */ ,  150.0f         /* [�C] */
/* F32   MotorTemp_Warm_Max   */ ,  160.0f         /* [�C] */

/* S16   SpeedMin,..Max,..Def */ ,  1000  ,  16000 ,  16000  /* [m/h] */

/* S16   SpeedMax_Perf[3]     */ ,  SPEEDMAX_PERF_KCPC_48V_3W
/* S16   SpeedDef_Perf[3]     */ ,  SPEEDDEF_PERF_KCPC_48V_3W

/* S16   Accel05_Perf[3]      */ ,  ACCEl05_PERF_KCPC_48V_3W
/* S16   Accel15_Perf[3]      */ ,  ACCEL15_PERF_KCPC_48V_3W
/* F32   iBatMax_Perf[3]      */ ,  IBATMAX_PERF_KCPC_48V_3W

/* S16   ACCELDECEL_DEF[4]    */ ,  ACCELDECEL_DEF_KCPC_48V_3W

/* U16   LSP_allowed          */ ,  0x0000             /* No LSP allowed */

/* F32   f32PowerMin          */ ,  0.28f              /* Min. power to climb up a 10% ramp                                      */

/* F32   f32_UCap_UpRate1     */ ,  0.06F              /*  30   [V/s] =  0.06[V] /0.002[s] */
/* F32   f32_UCap_DownRate1   */ , -0.01F              /* -5    [V/s] = -0.01[V] /0.002[s] */
/* F32   f32_UCap_UpRate2     */ ,  0.01F              /*  5    [V/s] =  0.01[V] /0.002[s] */
/* F32   f32_UCap_DownRate2   */ , -0.006F             /* -3    [V/s] = -0.006[V]/0.002[s] */
/* F32   f32_UCap_UpRate3     */ ,  0.003F             /*  1.5  [V/s] =  0.003[V]/0.002[s] */
/* F32   f32_UCap_DownRate3   */ , -0.002F             /* -1.0  [V/s] = -0.002[V]/0.002[s] */
/* F32   f32_UCap_Filt1       */ , 0.4F                /* 400 [ms] */
/* F32   f32_UCap_Filt2       */ , 2.0F                /* 2000[ms] */
/* F32   f32_UCap_Filt3       */ , 3.0F                /* 3000[ms] */

/* U16   u16_DriveTwinPowerpart */ ,  1

/*   S16 s16_uCapLow_Min  ; S16 s16_uCapLow_Max  ; S16 s16_uCapLow_Def  ; */
       , 58                   , 58                   , 58
/*   S16 s16_uCapHigh_Min ; S16 s16_uCapHigh_Max ; S16 s16_uCapHigh_Def ; */
       , 62                   , 62                   , 62

/* S16   s16WithLithiumIon      */ ,  TRUE

///* LITHIUM_ION_SPECS LiIonSpecs */ ,  LI_ION_BR1275

/* S16   SpecsEnd             */ ,  SPECSEND
};


const MODEL_SPECS specs_KCPC_48V_4W =
{
/* CH    name[16]             */   "KCPC_48V_4W"
/* U16   Variant              */ , KCPC_48V_4W
/* U16   TruckType            */ ,  1265
/* U32   TruckID              */ ,  0

/* F32   gear                 */ ,  1.0f/20.45f
/* F32   radius               */ ,  /* 0.231f*/ 0.2265f
/* F32   weight               */ ,  3600.0f
/* F32   wheelbase            */ ,  1.383f
/* F32   compactness          */ ,  0.333f
/* S16   SteerSen             */ ,  STEER_SEN_1H2L
/* F32   aSenL                */ , -82.0f/360.0f*ZPI
/* F32   aSenR                */ ,  56.281f/360.0f*ZPI
/* F32   gntilt               */ ,  0.477f

/* F32   BatCurrent           */ ,  600.0f
/* F32   BatCapacity          */ ,  550.0f
/* F32   BatResistIntern      */ ,  0.025F

/* F32   TqPeakGain           */ ,  20.0f * (3000.0f*3000.0f)/(28.0f*1.414f*28.0f*1.414f)     /* (NSR*NSR) / (USR*USR) */
/* F32   TqPeakSlip           */ ,  400.0f

/* F32   force0               */ ,  10800.0f       /* see Power.xmcd / par_mcad.m */
/* F32   tract0               */ ,  0.0456483f     /* 0.0813433,   -0.0544776,   0.323881   11485.74 */
/* F32   tract1               */ , -0.1642058f
/* F32   tract2               */ ,  0.358671f
/* F32   preq                 */ ,  11271.49f

/* F32   gain_ct              */ ,  242397.5f
/* F32   gain_kp              */ ,  0.01615727f

/* F32   BDICurInit           */ ,  50.0f
/* F32   BDICurChar..         */ ,  60.0f ,   120.0f
/* F32   BDICapChar..         */ ,  600.0f,   400.0f

/* THERM ThermTrac            */ ,  THERMTRAC_KCPC_48V
/* THERM ThermLift            */ ,  THERMLIFT_KCPC_48V

/* F32   Pole_pair_num        */ ,  2.0f

/* F32   MotorTemp_Warm_Min   */ ,  150.0f         /* [�C] */
/* F32   MotorTemp_Warm_Max   */ ,  160.0f         /* [�C] */

/* S16   SpeedMin,..Max,..Def */ ,  1000  ,  16000 ,  16000  /* [m/h] */

/* S16   SpeedMax_Perf[3]     */ ,  SPEEDMAX_PERF_KCPC_48V_4W
/* S16   SpeedDef_Perf[3]     */ ,  SPEEDDEF_PERF_KCPC_48V_4W

/* S16   Accel05_Perf[3]      */ ,  ACCEl05_PERF_KCPC_48V_4W
/* S16   Accel15_Perf[3]      */ ,  ACCEL15_PERF_KCPC_48V_4W
/* F32   iBatMax_Perf[3]      */ ,  IBATMAX_PERF_KCPC_48V_4W

/* S16   ACCELDECEL_DEF[4]    */ ,  ACCELDECEL_DEF_KCPC_48V_4W

/* U16   LSP_allowed          */ ,  0x0000             /* No LSP allowed */

/* F32   f32PowerMin          */ ,  0.28f              /* Min. power to climb up a 10% ramp                                      */

/* F32   f32_UCap_UpRate1     */ ,  0.06F              /*  30   [V/s] =  0.06[V] /0.002[s] */
/* F32   f32_UCap_DownRate1   */ , -0.01F              /* -5    [V/s] = -0.01[V] /0.002[s] */
/* F32   f32_UCap_UpRate2     */ ,  0.01F              /*  5    [V/s] =  0.01[V] /0.002[s] */
/* F32   f32_UCap_DownRate2   */ , -0.006F             /* -3    [V/s] = -0.006[V]/0.002[s] */
/* F32   f32_UCap_UpRate3     */ ,  0.003F             /*  1.5  [V/s] =  0.003[V]/0.002[s] */
/* F32   f32_UCap_DownRate3   */ , -0.002F             /* -1.0  [V/s] = -0.002[V]/0.002[s] */
/* F32   f32_UCap_Filt1       */ , 0.4F                /* 400 [ms] */
/* F32   f32_UCap_Filt2       */ , 2.0F                /* 2000[ms] */
/* F32   f32_UCap_Filt3       */ , 3.0F                /* 3000[ms] */

/* U16   u16_DriveTwinPowerpart */ ,  1

/*   S16 s16_uCapLow_Min  ; S16 s16_uCapLow_Max  ; S16 s16_uCapLow_Def  ; */
       , 58                   , 58                   , 58
/*   S16 s16_uCapHigh_Min ; S16 s16_uCapHigh_Max ; S16 s16_uCapHigh_Def ; */
       , 62                   , 62                   , 62

/* S16   s16WithLithiumIon      */ ,  TRUE

///* LITHIUM_ION_SPECS LiIonSpecs */ ,  LI_ION_BR1275

/* S16   SpecsEnd             */ ,  SPECSEND
};


const MODEL_SPECS specs_KCPC_80V =
{
/* CH    name[16]             */   "KCPC_80V"
/* U16   Variant              */ , KCPC_80V
/* U16   TruckType            */ ,  1266
/* U32   TruckID              */ ,  0

/* F32   gear                 */ ,  1.0f/29.9f
/* F32   radius               */ ,  0.290f
/* F32   weight               */ ,  5000.0f  /* 4220 ... light ~ 4500 ... heavy ~ 5500 ... 5720 */
/* F32   wheelbase            */ ,  1.720f
/* F32   compactness          */ ,  0.2848837f
/* S16   SteerSen             */ ,  STEER_SEN_1H2L
/* F32   aSenL                */ ,  -71.0f/360.0f*ZPI
/* F32   aSenR                */ ,  104.2f/360.0f*ZPI
/* F32   gntilt               */ ,  0.477f

/* F32   BatCurrent           */ ,  600.0f
/* F32   BatCapacity          */ ,  550.0f   /* 440  ... light ~ 500  ... heavy ~ 600  ... 700  */
/* F32   BatResistIntern      */ ,  0.04F

/* F32   TqPeakGain           */ ,  75.35f * (3000.0f*3000.0f) / (48.0f * 1.414f*48.0f * 1.414f)     /* (NSR*NSR) / (USR*USR) */
/* F32   TqPeakSlip           */ ,  540.0f

/* F32   force0               */ ,  16600.0f                  /* see par_mcad.m: */
/* F32   tract0               */ , 0.0556201f                 /* see par_mcad.m: */
/* F32   tract1               */ , -0.1830197f                /* see par_mcad.m: */
/* F32   tract2               */ , 0.2618098f                 /* see par_mcad.m: */
/* F32   preq                 */ ,  21995.29f                 /* see par_mcad.m: */

/* F32   gain_ct              */ ,  394784.0f
/* F32   gain_kp              */ ,  0.0343777f

/* F32   BDICurInit           */ ,  65.0f
/* F32   BDICurChar..         */ ,  60.0f ,   120.0f
/* F32   BDICapChar..         */ ,  800.0f,   500.0f

/* THERM ThermTrac            */ ,  THERMTRAC_KCPC_80V
/* THERM ThermLift            */ ,  THERMLIFT_KCPC_80V          /* 23.07.2013/TW: was THERMTRAC_BR1276 (copied from BR387/388) */

/* F32   Pole_pair_num        */ ,  2.0f

/* F32   MotorTemp_Warm_Min   */ ,  150.0f                    /* [�C] */
/* F32   MotorTemp_Warm_Max   */ ,  160.0f                    /* [�C] */

/* S16   SpeedMin,..Max,..Def */ ,  1000  ,  20000 ,  18000

/* S16   SpeedMax_Perf[3]     */ ,  SPEEDMAX_PERF_KCPC_80V
/* S16   SpeedDef_Perf[3]     */ ,  SPEEDDEF_PERF_KCPC_80V

/* S16   Accel05_Perf[3]      */ ,  ACCEl05_PERF_KCPC_80V
/* S16   Accel15_Perf[3]      */ ,  ACCEL15_PERF_KCPC_80V

/* F32   iBatMax_Perf[3]      */ ,  IBATMAX_PERF_KCPC_80V

/* S16   AccelDecel_def[4]    */ ,  ACCELDECEL_DEF_KCPC_80V

/* U16   LSP_allowed          */ ,  0x0000                    /* No LSP allowed */

/* F32   f32PowerMin          */ ,  0.2f                      /* Min. power to climb up a 10% ramp                                      */

/* F32   f32_UCap_UpRate1     */ ,  0.06F              /*  30   [V/s] =  0.06[V] /0.002[s] */
/* F32   f32_UCap_DownRate1   */ , -0.003F             /* -1.5  [V/s] = -0.003[V]/0.002[s] */
/* F32   f32_UCap_UpRate2     */ ,  0.06F              /*  30   [V/s] =  0.06[V] /0.002[s] */
/* F32   f32_UCap_DownRate2   */ , -0.003F             /* -1.5  [V/s] = -0.003[V]/0.002[s] */
/* F32   f32_UCap_UpRate3     */ ,  0.06F              /*  30   [V/s] =  0.06[V] /0.002[s] */
/* F32   f32_UCap_DownRate3   */ , -0.003F             /* -1.5  [V/s] = -0.003[V]/0.002[s] */
/* F32   f32_UCap_Filt1       */ , 0.4F                /* 400[ms] */
/* F32   f32_UCap_Filt2       */ , 0.4F                /* 400[ms] */
/* F32   f32_UCap_Filt3       */ , 0.4F                /* 400[ms] */

/* U16   u16_DriveTwinPowerpart */ ,  1

/*   S16 s16_uCapLow_Min  ; S16 s16_uCapLow_Max  ; S16 s16_uCapLow_Def  ; */
       , 96                   , 96                   , 96
/*   S16 s16_uCapHigh_Min ; S16 s16_uCapHigh_Max ; S16 s16_uCapHigh_Def ; */
       , 102                  , 102                  , 102

/* S16   s16WithLithiumIon      */ ,  TRUE

///* LITHIUM_ION_SPECS LiIonSpecs */ ,  LI_ION_BR1276

/* S16   SpecsEnd             */ ,  SPECSEND
};




/*===============================================[ public variables  ]================================================*/

F32 sp_TransmisRatio = 0.29f/29.9f;            /* radius*gear = 0.29/29.9 = 0.00969 */

U16 sp_TruckType;
U16 sp_Variant  ;

const  MODEL_SPECS* specs = &specs_INVALID;   /* truck specific parameter set */

/*===============================================[ private functions ]================================================*/

/*====================================================================================================================*/


/**
*  Initialization.
*
*  Initialize the input module.
*
*  \return RC_SUCCESS if successful.
*/
RC specs_initialize( U16 u16SpVariant )
{

   if      (u16SpVariant==KCPC_80V)    { specs = &specs_KCPC_80V      ; }
   else if (u16SpVariant==KCPC_48V_3W) { specs = &specs_KCPC_48V_3W   ; }
   else if (u16SpVariant==KCPC_48V_4W) { specs = &specs_KCPC_48V_4W   ; }
   else                                { specs = &specs_INVALID         ; }


   sp_TruckType      = specs->TruckType;
   sp_TransmisRatio  = specs->radius * specs->gear;

   return RC_SUCCESS;
}


/***********************************************************************************************************************
*                             Copyright 2012 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/


